package com.zxc.userservice.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zxc.oj.model.dto.user.UserQueryRequest;
import com.zxc.oj.model.entity.User;
import com.zxc.oj.model.vo.LoginUserVO;
import com.zxc.oj.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 用户 服务类
 * </p>
 *
 * @author author
 * @since 2024-02-10
 */
public interface UserService extends IService<User> {

    User getLoginUser(HttpServletRequest request);

    boolean isAdmin(HttpServletRequest request);

    boolean isAdmin(User user);

    LoginUserVO getLoginUserVO(User user);

    boolean userLogout(HttpServletRequest request);

    LoginUserVO userLogin(String userAccount, String userPassword, HttpServletRequest request);

    long userRegister(String userAccount, String userPassword, String checkPassword, String userName);

    UserVO getUserVO(User user);

    List<UserVO> getUserVO(List<User> userList);

    Wrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);
    User getLoginUserPermitNull(HttpServletRequest request);
}
